package com.sun.app.process.front.search;

import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sun.app.process.BaseProcess;
import com.sun.core.common.PagingList;

public class SearchProcess extends BaseProcess{

	@Override
	public HashMap<String, Object> execute(HttpServletRequest request,
			HttpServletResponse response, HashMap<String, Object> model)
			throws Exception {
		String queryStr = request.getParameter("q");
		if(queryStr!=null){
			//查询操作
			String s = new String(queryStr.getBytes("ISO-8859-1"), "UTF-8");
			System.out.println("搜索"+queryStr+"\n"+s);
			PagingList queryUserPageList = getServMgr().getSearchService().doSearchQueryUser(s,request);
			model.put("result", queryUserPageList);
		}
		
		return model;
	}
}
